<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title><?php echo ($AGENT["name"]); ?></title>
<link href='/pintuan/Public/Member/css/global.css' rel='stylesheet' type='text/css' />
<link href='/pintuan/Public/Member/css/main.css' rel='stylesheet' type='text/css' />
<script type='text/javascript' src='/pintuan/Public/Member/js/jquery-1.7.2.min.js'></script>
<script type='text/javascript' src='/pintuan/Public/Member/js/global.js'></script>
<script type='text/javascript'>
var web_domain='/pintuan';
var static_domain='/pintuan';
var img_domain='/pintuan';
var _PUBLIC_ = '/pintuan/Public';
var _FILE_ = '<?php echo U('Index/ajaxFileUpload');?>';
</script>
<link href='/pintuan/Public/Member/css/wechat.css' rel='stylesheet' type='text/css' />
<script type='text/javascript' src='/pintuan/Public/Member/js/wechat.js'></script>
<!--[if lte IE 9]><script src="__PUBIC__/Member/js/jquery.watermark-1.3.js"></script><![endif]-->
<script type='text/javascript' src='/pintuan/Public/Member/js/operamasks-ui.min.js'></script>
<link href='/pintuan/Public/Member/css/operamasks-ui.css' rel='stylesheet' type='text/css' />
</head>
<body>
<div id="iframe_page">
    <div class="iframe_content"> 
		<div class="r_nav">
		    <ul>
	            <li class="<?php if(!in_array(ACTION_NAME,array('url','sysurl'))): ?>cur<?php endif; ?>"><a href="<?php echo U('Material/index');?>">图文消息管理</a></li>
	            <li class="<?php if((ACTION_NAME) == "url"): ?>cur<?php endif; ?>"><a href="<?php echo U('Material/url');?>">自定义URL</a></li>
          	</ul>
		</div>
		
<script language="javascript">$(document).ready(wechat_obj.material_multi_init);</script>
<div id="material" class="r_con_wrap">
      <form id="material_form" method="post" action="<?php echo U('Material/newsSave');?>">
          <div class="m_lefter multi">
               <div class="time"><?php echo (date("Y-m-d",$createtime)); ?></div>
               <!-- 第一条  开始 -->
               <div class="first" id="multi_msg_0">
                   <div class="info">
                       <div class="img"><?php if(($update) == "1"): ?><img src="<?php echo ($firstNews["ImgPath"]); ?>"><?php else: ?>封面图片<?php endif; ?></div>
                       <div class="title"><?php if(($update) == "1"): echo ($firstNews["Title"]); else: ?>消息标题<?php endif; ?></div>
                   </div>
                   <div class="control">
                       <a href="#mod"><img src="/pintuan/Public/Member/images/ico/mod.gif" /></a>
                   </div>
                   <input type="hidden" name="Title[]" value="<?php echo ($firstNews["Title"]); ?>" />
                   <input type="hidden" name="Url[]" value="<?php echo ($firstNews["Url"]); ?>" />
                   <input type="hidden" name="ImgPath[]" value="<?php echo ($firstNews["ImgPath"]); ?>" />
               </div>
                    <!-- 第一条  结束 -->
                    <!-- 列表  开始 -->
              <?php if(($update) == "0"): ?><div class="list" id="multi_msg_1">
                  <div class="info">
                      <div class="title"><?php if(($update) == "1"): echo ($v["Title"]); else: ?>标题<?php endif; ?></div>
                      <div class="img"><?php if(($update) == "1"): ?><img src="<?php echo ($v["ImgPath"]); ?>"><?php else: ?>缩略图<?php endif; ?></div>
                  </div>
                  <div class="control">
                      <a href="#mod"><img src="/pintuan/Public/Member/images/ico/mod.gif" /></a>
                      <a href="#del"><img src="/pintuan/Public/Member/images/ico/del.gif" /></a>
                  </div>
                  <input type="hidden" name="Title[]" value="<?php echo ($v["Title"]); ?>" />
                  <input type="hidden" name="Url[]" value="<?php echo ($v["Url"]); ?>" />
                  <input type="hidden" name="ImgPath[]" value="<?php echo ($v["ImgPath"]); ?>" />
              	  </div><?php endif; ?>
              <?php if(is_array($othersNews)): $i = 0; $__LIST__ = $othersNews;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><div class="list" id="multi_msg_<?php echo ($i); ?>">
                  <div class="info">
                      <div class="title"><?php if(($update) == "1"): echo ($v["Title"]); else: ?>标题<?php endif; ?></div>
                      <div class="img"><?php if(($update) == "1"): ?><img src="<?php echo ($v["ImgPath"]); ?>"><?php else: ?>缩略图<?php endif; ?></div>
                  </div>
                  <div class="control">
                      <a href="#mod"><img src="/pintuan/Public/Member/images/ico/mod.gif" /></a>
                      <a href="#del"><img src="/pintuan/Public/Member/images/ico/del.gif" /></a>
                  </div>
                  <input type="hidden" name="Title[]" value="<?php echo ($v["Title"]); ?>" />
                  <input type="hidden" name="Url[]" value="<?php echo ($v["Url"]); ?>" />
                  <input type="hidden" name="ImgPath[]" value="<?php echo ($v["ImgPath"]); ?>" />
              </div><?php endforeach; endif; else: echo "" ;endif; ?>
                    <!-- 列表  结束 -->
              <div class="add"><a href="#add"><img src="/pintuan/Public/Member/images/ico/add.gif" align="absmiddle" /> 增加一条</a></div>
		</div>
        <div class="m_righter">
            <div class="mod_form">
                <div class="jt"><img src="/pintuan/Public/Member/images/material/jt.gif" /></div>
                <div class="m_form">
                    <span class="fc_red">*</span> 标题<br />
                    <div class="input"><input name="inputTitle" value="" type="text" /></div>
                    <div class="blank9"></div>
                    <span class="fc_red">*</span> 封面图片 <span class="tips">大图尺寸建议：<span class="big_img_size_tips">640*360px</span></span><br />
                    <div class="blank6"></div>
                    <div><input name="FileUpload" id="MsgFileUpload" type="file" /></div>
                    <div class="blank3"></div>
                    <span class="fc_red">*</span> 链接页面<br />
                    <div class="input">
                        <select name='inputUrl'>
                            <option value=''>--请选择--</option>
	<!-- <optgroup label='---------------系统模块---------------'></optgroup>
		<?php if(is_array($linkurl["modules"])): foreach($linkurl["modules"] as $key=>$v): ?><option value='<?php echo ($v["url"]); ?>' ><?php echo ($v["title"]); ?></option><?php endforeach; endif; ?>
	<optgroup label='---------------本地优惠---------------'></optgroup>
		<?php if(is_array($linkurl["coupon"])): foreach($linkurl["coupon"] as $key=>$v): ?><option value='<?php echo ($v["url"]); ?>' ><?php echo ($v["title"]); ?></option><?php endforeach; endif; ?>  
	<optgroup label='---------------城市历史---------------'></optgroup>
		<?php if(is_array($linkurl["history"])): foreach($linkurl["history"] as $key=>$v): ?><option value='<?php echo ($v["url"]); ?>' ><?php echo ($v["title"]); ?></option><?php endforeach; endif; ?>
	<optgroup label='---------------萌宝大赛---------------'></optgroup>
	    <option value='<?php echo ($linkurl["baby"]["rule"]); ?>' >参赛规则</option>
	    <option value='<?php echo ($linkurl["baby"]["cheat"]); ?>' >参赛秘籍</option>
	    <option value='<?php echo ($linkurl["baby"]["join"]); ?>' >我要参赛</option>
	    <option value='<?php echo ($linkurl["baby"]["prize"]); ?>' >参赛奖品</option> -->
	<optgroup label='---------------自定义Url---------------'></optgroup>
		<?php if(is_array($linkurl["urls"])): foreach($linkurl["urls"] as $key=>$v): ?><option value='<?php echo ($v["url"]); ?>' ><?php echo ($v["title"]); ?></option><?php endforeach; endif; ?>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="clear"></div>
        <div class="button"><input type="submit" class="btn_green" name="submit_button" value="提交保存" /><a href="<?php echo U('Material/index');?>" class="btn_gray">返回</a></div>
        <input type="hidden" name="id" value="<?php echo ($id); ?>" />
        <input type="hidden" name="msgtype" value="news" />
        <input type="hidden" name="msgtype" value="news" />
    </form>
</div>  


	</div>
</div>
</body>
</html>